
#pragma once
#include "Scenegraph/GameScene.h"
#include "..\Week 4\Character.h"
#include "../../../OverlordEngine/Prefabs/SpherePrefab.h"
#include "../../../OverlordEngine/Prefabs/SkyBoxPrefab.h"
#include "../../../OverlordEngine/Graphics/SpriteFont.h"
#include "Enemy.h"
#include "Bullet.h"

class Game : public GameScene
{
public:
	Game(void);
	virtual ~Game(void);

protected:

	virtual void Initialize(const GameContext& gameContext);
	virtual void Update(const GameContext& gameContext);
	virtual void Draw(const GameContext& gameContext);

private:

	void CreateCloth( XMFLOAT3 pos );
	void CreatePlayer(const GameContext& gameContext);
	void CreateEnemy( const GameContext& gameContext);
	void CreateLevel( const GameContext& gameContext);
	void UpdatePlayer( const GameContext& gameContext);
	void UpdateEnemy( const GameContext& gameContext);
	void CreatePostProEffects( const GameContext& GameContext );
	bool IsEqualXMFLOAT3( XMFLOAT3 a, XMFLOAT3 b );
	float GetDistanceXMFLOAT3( XMFLOAT3 a, XMFLOAT3 b );
	PxCloth* m_Cloth;
	
	ModelComponent* m_pModel;
	SkyBoxPrefab* m_SkyBox;
	GameObject* m_pLevel;

	Character* m_pPlayer;
	vector< Bullet* > m_pPlayerBullets;
	vector< Bullet* > m_pEnemyBullets;
	bool m_IsMouseDown;
	bool m_IsF1Down;
	bool m_IsDebugOn;
	SpriteFont* m_pFont;

	float m_Counter;
	int m_Kills;
	int m_Lives;

	void PathFinding(const GameContext& gameContext);
	void ShootPlayer(const GameContext &gameContext);

	vector<Enemy *> m_pEnemyList;

private:
	// -------------------------
	// Disabling default copy constructor and default 
	// assignment operator.
	// -------------------------
	Game(const Game &obj);
	Game& operator=(const Game& obj);
};